package com.yr.ryjk.coin.dao;

import java.util.List;

import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import com.yr.ryjk.coin.entity.CoinRecord;

public interface CoinRecordMapper {
    int deleteByPrimaryKey(Integer coinRecordId);

    int insert(CoinRecord record);

    int insertSelective(CoinRecord record);

    CoinRecord selectByPrimaryKey(Integer coinRecordId);

    int updateByPrimaryKeySelective(CoinRecord record);

    int updateByPrimaryKey(CoinRecord record);

    @Select("select * from coin_record where user_id=#{2} order by operate_time desc limit #{0},#{1}")
    @ResultMap("BaseResultMap")
	List<CoinRecord> selectOfPage(int start, int pageSize, String id);
    
    @Select("select count(1) from coin_record where user_id=#{0}")
    @ResultType(Integer.class)
	int selectCount(String id);
}